package com.party.core.model.analysis;

import com.party.core.model.BaseModel;

import java.io.Serializable;

/**
 * @program: party-temp
 * @description: 用户访问
 * @author: Huaqunhao
 * @create: 2018-08-08 11:38
 **/
public class StatisticsUserVisit extends BaseModel implements Serializable {

    private static final long serialVersionUID = -3190932424189385922L;

    //db
    //新用户数
    private Integer newNum;
    //老用户数
    private Integer oldNum;



    //business
    //开始时间
    private String staDate;
    //结束时间
    private String endDate;
    //新用户比率
    private String newUserRatio;
    //老用户比率
    private String oldUserRatio;
    //查询周期
    private Integer cycle;
    //当前日期
    private String currentDate;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Integer getNewNum() {
        return newNum;
    }

    public void setNewNum(Integer newNum) {
        this.newNum = newNum;
    }

    public Integer getOldNum() {
        return oldNum;
    }

    public void setOldNum(Integer oldNum) {
        this.oldNum = oldNum;
    }

    public String getStaDate() {
        return staDate;
    }

    public void setStaDate(String staDate) {
        this.staDate = staDate;
    }

    public String getEndDate() {
        return endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    public String getNewUserRatio() {
        return newUserRatio;
    }

    public void setNewUserRatio(String newUserRatio) {
        this.newUserRatio = newUserRatio;
    }

    public String getOldUserRatio() {
        return oldUserRatio;
    }

    public void setOldUserRatio(String oldUserRatio) {
        this.oldUserRatio = oldUserRatio;
    }

    public Integer getCycle() {
        return cycle;
    }

    public void setCycle(Integer cycle) {
        this.cycle = cycle;
    }

    public String getCurrentDate() {
        return currentDate;
    }

    public void setCurrentDate(String currentDate) {
        this.currentDate = currentDate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;

        StatisticsUserVisit that = (StatisticsUserVisit) o;

        if (newNum != null ? !newNum.equals(that.newNum) : that.newNum != null) return false;
        if (oldNum != null ? !oldNum.equals(that.oldNum) : that.oldNum != null) return false;
        if (staDate != null ? !staDate.equals(that.staDate) : that.staDate != null) return false;
        if (endDate != null ? !endDate.equals(that.endDate) : that.endDate != null) return false;
        if (newUserRatio != null ? !newUserRatio.equals(that.newUserRatio) : that.newUserRatio != null) return false;
        if (oldUserRatio != null ? !oldUserRatio.equals(that.oldUserRatio) : that.oldUserRatio != null) return false;
        if (cycle != null ? !cycle.equals(that.cycle) : that.cycle != null) return false;
        return currentDate != null ? currentDate.equals(that.currentDate) : that.currentDate == null;
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (newNum != null ? newNum.hashCode() : 0);
        result = 31 * result + (oldNum != null ? oldNum.hashCode() : 0);
        result = 31 * result + (staDate != null ? staDate.hashCode() : 0);
        result = 31 * result + (endDate != null ? endDate.hashCode() : 0);
        result = 31 * result + (newUserRatio != null ? newUserRatio.hashCode() : 0);
        result = 31 * result + (oldUserRatio != null ? oldUserRatio.hashCode() : 0);
        result = 31 * result + (cycle != null ? cycle.hashCode() : 0);
        result = 31 * result + (currentDate != null ? currentDate.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "StatisticsUserVisit{" +
                "newNum=" + newNum +
                ", oldNum=" + oldNum +
                ", staDate='" + staDate + '\'' +
                ", endDate='" + endDate + '\'' +
                ", newUserRatio='" + newUserRatio + '\'' +
                ", oldUserRatio='" + oldUserRatio + '\'' +
                ", cycle=" + cycle +
                ", currentDate='" + currentDate + '\'' +
                '}';
    }
}
